A PHP file is a text file containing code to be run on a webserver by a program called php. It's the most used dynamic page script engine as it is free and open source.
Use the fopen() function to open files in PHP. The first parameter of this function is the file to be opened and the second parameter specifies in which mode the file should be opened